<div>
<fieldset>
 		<legend>User Profile</legend>
 	<?php
 		echo $html->link(__('Profile Information',true), '/users/profile_infos');
		echo ' | ';
	  	echo $html->link(__('Auctions', false), '/users/profile_auctions');	
	  ?>
<table cellpadding="0" cellspacing="0">
<tr>
	<th><?php echo __('Item');?></th>
	<th><?php echo __('Date');?></th>
	<th><?php echo __('No. licitations');?></th>
	<th><?php echo __('Price');?></th>
</tr>
<?php

$i = 0;
foreach ($sales as $sale):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>	

	<tr<?php echo $class;?>>
		<td>
			<?php echo($sale['Item']['name']); ?>
		</td>
		<td>
			<?php echo($sale['Sale']['timeEnd']); ?>
		</td>
		<td>
			<?php 
			
			echo($this->requestAction('/users/licitationsUsed/'.$sale['Sale']['id']));?>
		</td>
		<td>
			<?php echo($sale['Sale']['currentPrice']); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</fieldset>
</div>

